﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="Supplier.aspx.cs" Inherits="ProjectSem3.Admin.WebForm21" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script type="text/javascript"> 
           function checkNumber1(sender, args) {
               var num = document.getElementById('<%=TextBoxPhone.ClientID %>').value;

            if (isNaN(num)) {
                args.IsValid = false;
            }
            else {

                args.IsValid = true;
            }
        }
        </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="contentTabs" runat="server">  <ul>
        <li><a href="Supplier.aspx"><span>Supplier</span></a></li>
        <li><a href="ListSupplier.aspx"><span>List Supplier</span></a></li>
        <li><a href="Categories.aspx"><span>Categories</span></a></li>
        <li><a href="ListCategories.aspx"><span>List Categories</span></a></li>
    </ul>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="contentPage" runat="server">
<div class="grid_9">
                <h1 class="content_edit">Supplier</h1>
            </div>
            <!-- CONTENT TITLE RIGHT BOX -->            
            <div class="clear"></div>
            <div class="grid_15" id="textcontent">
            <div class="portlet">
        <div class="portlet-content nopadding">
            <table width="100%" cellpadding="0" cellspacing="0" id="box-table-a" summary="Employee Pay Sheet">
                <tr>
                    <td>
                        <asp:Label ID="Label1" Text="Supplier Name:" runat="server"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="TextBoxSupplierName" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                            ControlToValidate="TextBoxSupplierName" ErrorMessage="Input this box">Input this box</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label2" Text="Phone:" runat="server"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="TextBoxPhone" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                            ControlToValidate="TextBoxPhone" ErrorMessage="Input this box">Input this box</asp:RequiredFieldValidator>
                              <asp:CustomValidator ID="CustomValidator2" runat="server" ControlToValidate="TextBoxPhone"
                            Display="Dynamic" ErrorMessage="CustomValidator" 
                            ClientValidationFunction="checkNumber1" ForeColor="Red" 
                            ValidationGroup="1">numberic only</asp:CustomValidator>
                        <asp:RangeValidator ID="RangeValidator2" runat="server" 
                            ControlToValidate="TextBoxPhone" Display="Dynamic" 
                            ErrorMessage="RangeValidator" ForeColor="Red" MinimumValue="0" 
                            ValidationGroup="1" MaximumValue="10">11&gt;value&gt;0</asp:RangeValidator>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label3" Text="Address:" runat="server"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="TextBoxAddress" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                            ControlToValidate="TextBoxAddress" ErrorMessage="Input this box">Input this box</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label4" Text="Type:" runat="server"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="TextBoxTypeOf" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                            ControlToValidate="TextBoxTypeOf" ErrorMessage="Input this box">Input this box</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label5" Text="Status" runat="server"></asp:Label>
                    </td>
                    <td>
                        <asp:RadioButtonList runat="server" ID="RadioButtonListStatus" 
                            RepeatDirection="Horizontal" TextAlign="Left" Width="150px">
                            <asp:ListItem>Enable</asp:ListItem>
                            <asp:ListItem>Disable</asp:ListItem>
                        </asp:RadioButtonList>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                            ControlToValidate="TextBoxTypeOf" ErrorMessage="Input this box">Input this box</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <asp:Button ID="ButtonSave" runat="server" Text="Save" 
                            onclick="ButtonSave_Click" />
                    </td>
                </tr>
            </table>
            </div>
            </div>
            </div>
</asp:Content>
